GXGetStylePattern
You can use theGXGetStylePattern
function to retrieve the pattern information from a style object.
gxPatternRecord *GXGetStylePattern(gxStyle source, gxPatternRecord *pattern);
source
- The style object whose pattern information you want to retrieve.
pattern
- A pointer to a
gxPatternRecord
structure. On return, this structure contains the pattern information for the source style object.- function result
- A copy of the
gxPatternRecord
structure associated with the
source style object.DESCRIPTION
TheGXGetStylePattern
function returns as its function result, and in thepattern
parameter, a pointer to agxPatternRecord
structure containing the pattern information for the style object specified by thesource
parameter.This function creates a new shape to encapsulate the pattern geometry, and places a reference to this shape in the
pattern
field of the returnedgxPatternRecord
structure. You should dispose of this shape when you no longer need it.Since this function copies the pattern information from the source style, you may make changes to the
gxPatternRecord
structure returned by this function without affecting the source style's pattern information. If you want to change the pattern information in the source style, you must use theGXSetStylePattern
function.SPECIAL CONSIDERATIONS
Unless an error results, theGXGetStylePattern
function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about disposing of QuickDraw GX objects.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory style_is_nil parameter_is_nil SEE ALSO
For a discussion of patterns, see "Patterns" on page 3-31.For examples of adding patterns to shapes, see page 3-86 through page 3-91.
For a discussion of the
gxPatternRecord
structure and a description of what types of shapes you can use as pattern shapes, see "The Pattern Structure" on page 3-106.To specify pattern information for a style object, use the
GXSetStylePattern
function, which is described in the next section.To retrieve pattern information from a style object associated with a particular shape, use the
GXGetShapePattern
function, which is described on page 3-145. To specify pattern information for a style object associated with a particular shape, use theGXSetShapePattern
function, which is described on page 3-146.To determine where pattern shapes are drawn for a particular shape, use the
GXGetShapePatternPositions
function, which is described on page 3-147.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help